package com.easybacklog.client;

import com.easybacklog.client.cucumberfeatures.ProductBacklogView;
import com.easybacklog.client.sourcefeatures.SourceFeaturesView;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.VerticalPanel;

/**
 * 
 * @UserInterface
 */
public class EasyBacklogPage extends VerticalPanel {

	public EasyBacklogPage() {

		this.clear();

		this.setWidth("600px");

		this.add(getAnchorVision());

		this.setSpacing(20);

		this.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);

		this.add(new ProductBacklogView());

		this.add(new SourceFeaturesView());
	}

	private Anchor getAnchorVision() {

		Anchor vision = new Anchor("Vision");
		vision.addClickHandler(new ClickHandler() {

			@Override
			public void onClick(ClickEvent event) {

				InitializeEasyBacklog.vpBacklog.clear();
			//	InitializeEasyBacklog.vpBacklog.add(new VisionPage());
			}
		});

		return vision;
	}

}
